// 统一管理首页相关的文件

import request from '../../utils/request.js'

const actions = {
	// 获取首页的数据
	async	getIndexData({commit}){
		const result = await request('/indexData')
		if(result.code == 200){
			commit('save_IndexData',result.indexData)
		}
	}
}



const mutations = {
	save_IndexData(state,indexData){
		state.indexData = indexData
	}
}

const state = {
	indexData:{}
}




export default {
	namespaced:true,
	actions,
	mutations,
	state
	
}